﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SuperJoe.Framework.Core
{
    public class SuperJoeContext
    {
        static IContextResolver contextResolver = null;

        public SuperJoeContext()
        {
            Items = new Dictionary<string, object>();
        }

        public static void SetResolver(IContextResolver resolver)
        {
            contextResolver = resolver;
        }

        public static SuperJoeContext Current
        {
            get
            {
                return contextResolver.Context;
            }
            set
            {
                contextResolver.Context = value;
            }
        }

        public string UserId { get; set; }

        public string Name { get; set; }

        public Dictionary<string, object> Items { get; set; }
    }
}
